package cn.iot.controller.sys;

import cn.iot.common.dto.ResultMsg;
import cn.iot.sys.entity.SysStudent;
import cn.iot.sys.service.SysPaycategoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/sys/paycategory")
public class SysPaycategoryController {
    @Autowired
    private SysPaycategoryService sysPaycategoryService;
    public Logger logger = LoggerFactory.getLogger(getClass());

    @PostMapping("getSysPaycategoryList")
    public ResultMsg getSysPaycategoryList(){
        logger.info("SysPaycategoryController getSysPaycategoryList start ...");
        ResultMsg msg = sysPaycategoryService.getSysPaycategoryList();
        logger.debug("SysPaycategoryController getSysPaycategoryList msg{}",msg);
        return msg;
    }

    @PostMapping("getSysPaycListByStuId")
    public ResultMsg getSysPaycListByStuId(@RequestParam String studentId){
        logger.info("SysPaycategoryController getSysPaycListByStuId studentId{}",studentId);
        ResultMsg msg = sysPaycategoryService.getSysPaycListByStuId(studentId);
        logger.debug("SysPaycategoryController getSysPaycListByStuId msg{}",msg);
        return msg;
    }
}
